package com.yao.mall.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yao.mall.model.dto.AttrKeyAddRequest;
import com.yao.mall.model.dto.AttrKeySearchRequest;
import com.yao.mall.model.dto.AttrKeyUpdateRequest;
import com.yao.mall.model.entity.AttrKey;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yao.mall.model.vo.AttrKeyVO;

import java.util.List;

/**
* @author jiahua.yao
* @description 针对表【attrKey】的数据库操作Service
* @date 2024-03-10 20:41:17
*/
public interface AttrKeyService extends IService<AttrKey> {

    /**
     * 获取属性key
     * @return list
     */
    List<AttrKeyVO> getAttrKey();

    /**
     * key->keyVO
     * @param attrKeyList keyList
     * @return keyVOlist
     */
    List<AttrKeyVO> toAttrKeyVO(List<AttrKey> attrKeyList);

    /**
     * 条件获取属性名称
     * @param attrKeySearchRequest
     * @return
     */
    Page<AttrKeyVO> getAttrKeyByConditions(AttrKeySearchRequest attrKeySearchRequest);

    /**
     * 添加属性名
     * @param attrKeyAddRequest
     * @return
     */
    Boolean addAttrKey(AttrKeyAddRequest attrKeyAddRequest);

    /**
     * 删除属性名
     * @param id
     * @return
     */
    Boolean deleteAttrKey(Long id);

    /**
     * 更新属性名称
     * @param attrKeyUpdateRequest
     * @return
     */
    Boolean updateAttrKey(AttrKeyUpdateRequest attrKeyUpdateRequest);

}


